<?php
ini_set('default_socket_timeout', -1);
header("Content-type: text/html; charset=utf-8");
$redis = new Redis();
$redis->pconnect('127.0.0.1',6379);

$redis->subscribe(array('car_package'), 'callback');

// 回调函数,这里写处理逻辑
function callback($instance, $channelName, $message) {
echo $channelName, "==>", $message,PHP_EOL;

}